
CC=gcc
CFLAGS=-c -Wall -s -Os
LDFLAGS=
SOURCES=main.c typing.c screen.c
OBJECTS=$(SOURCES:.c=.o)
EXECUTABLE=typing

all: $(SOURCES) $(EXECUTABLE)

$(EXECUTABLE): $(OBJECTS)
	$(CC) $(LDFLAGS) $(OBJECTS) -o $@ -lncurses -lpthread

.c.o:
	$(CC) $(CFLAGS) $< -o $@

clean:
	rm -f $(EXECUTABLE) $(OBJECTS) words
